﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/UserLayout.Master" AutoEventWireup="true" CodeBehind="ProductListByUser.aspx.cs" Inherits="DigitalAnts.User.ProductListByUser" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="col-main">
												<div id="map-popup" class="map-popup" style="display:none;">
    <div class="map-popup-arrow"></div>
    <div class="map-popup-heading"><h2 id="map-popup-heading"></h2></div>
    <div class="map-popup-content" id="map-popup-content">

        <div class="map-popup-checkout">
           
                <button type="button" title="Add to Cart" class="button btn-cart" id="map-popup-button"><span><span>Add to Cart</span></span></button>
          
        </div>
        <div class="map-popup-msrp" id="map-popup-msrp-box"><strong>Price:</strong> <span style="text-decoration:line-through;" id="map-popup-msrp"></span></div>

        <div class="map-popup-price" id="map-popup-price-box"><strong>Actual Price:</strong> <span id="map-popup-price"></span></div>
    </div>
    
</div>
<div class="my-account"><div class="my-wishlist">
    <div class="page-title title-buttons">
                <h1>Danh sách sản phẩm</h1>
    </div>

    <asp:GridView ID="gvProductList" runat="server" DataKeyNames="colProductID"
        OnPageIndexChanging="gv_PageIndexChanging"  OnSorting="gv_Sorting"
        CssClass="data-table cart-table" EnableModelValidation="True" 
        AutoGenerateColumns="False" AllowPaging="True" PageSize="5" 
        onrowdeleting="gvProductList_RowDeleting">
        <PagerSettings  FirstPageText="First" LastPageText="Last" Mode="NumericFirstLast" NextPageText="Next" PreviousPageText="Previous"  ></PagerSettings>

        <RowStyle CssClass="table-row"/>
       <EmptyDataTemplate>
            <p class="status"><strong>Không có sản phẩm nào trong danh mục này.</strong></p>
        </EmptyDataTemplate>
    <Columns> 
                <asp:TemplateField HeaderText="Ảnh">
                <ItemTemplate>
                <a href="../ProductDetail.aspx?id=<%# Eval("colProductID") %>" class="product-image">
                    <img src="../resource/product_pic/<%# Eval("colAvatar") %>"/></a>

                </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Tiêu đề">
                    <ItemTemplate>
                        <h2>
                            <a href="../ProductDetail.aspx?id=<%# Eval("colProductID") %>">
                                <strong><%# Eval("colTitle") %></strong>
                            </a>
                        </h2>
                            Hãng xe: <strong><%# Eval("colProducer") %></strong>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Sửa">
                    <ItemTemplate>
                            <a href="../User/AddNewProduct.aspx?id=<%# Eval("colProductID") %>">
                               Sửa
                            </a>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Giá (vnđ)">
                    <ItemTemplate>
                                 <span class="cart-price"><%# String.Format("{0:0,0}", Eval("colPrice"))%></span>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Lượt Xem">
                    <ItemTemplate>
                         <input value="<%# Eval("colVisit") %>" class="input-text qty" readonly="readonly"/>
                    </ItemTemplate>
                </asp:TemplateField>
                
                <asp:TemplateField HeaderText="Nơi Bán">
                    <ItemTemplate>
                         <%# Eval("CityName") + "<br/>-<br/>" + Eval("Country")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Thời hạn">
                    <ItemTemplate>
                        <%# String.Format("{0:dd/MM/yyyy}", Eval("colEndDate"))%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Xóa">
                    <ItemTemplate>
                        <asp:LinkButton ID="lblBtnDelete" OnClientClick='return confirm("Bạn có chắc muốn xóa?")' runat="server"  CssClass="btn-remove btn-remove2" CommandName="Delete">Xóa</asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>

    </Columns>
    <HeaderStyle Font-Bold="True" />
    <FooterStyle Font-Bold="True" />
    </asp:GridView>
       
</div>
</div>					</div>
</asp:Content>
